@extends('layout/header')
@section('headcss')
@stop
@section('content')
    <?php
    function subtext($text, $length)
    {
        if(mb_strlen($text, 'utf8') > $length) {
            return mb_substr($text, 0, $length, 'utf8').'...';
        } else {
            return $text;
        }
    }?>
    <div id="content">
        <div class="area">
            <ul class="container clearfix">
                <li class="clearfix">
                    <div class="fl">华北<span></span></div>
                    <div class="fr clearfix"> <span> <a  onclick="changecity(this)" value="110000">  北京</a></span><span> <a onclick="changecity(this)" value="120000">  天津</a></span><span> <a onclick="changecity(this)" value="150000">  内蒙古</a></span><span> <a  onclick="changecity(this)" value="130000">  河北</a></span><span> <a href="javasrcipt:;" onclick="changecity(this)" value="140000">  山西</a></span>
                    </div>
                </li>
                <li class="clearfix">
                    <div class="fl">华东<span></span></div>
                    <div class="fr clearfix"> <span> <a  onclick="changecity(this)" value="310000">  上海</a></span><span> <a  onclick="changecity(this)" value="370000">  山东</a></span><span> <a onclick="changecity(this)" value="320000">  江苏</a></span><span> <a onclick="changecity(this)" value="340000">  安徽</a></span><span> <a onclick="changecity(this)" value="360000">  江西</a></span>
                    </div>
                </li>
                <li class="clearfix" style="width:152px">
                    <div class="fl">华中<span></span></div>
                    <div class="fr clearfix four" style="width:100px"> <span> <a  onclick="changecity(this)" value="420000">  湖北</a></span><span> <a  onclick="changecity(this)" value="430000">  湖南</a></span><span> <a onclick="changecity(this)" value="410000">  河南</a></span>
                    </div>
                </li>
                <li class="clearfix" style="width:152px">
                    <div class="fl">华南<span></span></div>
                    <div class="fr clearfix four" style="width:100px"> <span> <a  onclick="changecity(this)" value="440000">  广东</a></span><span> <a  onclick="changecity(this)" value="450000">  广西</a></span><span> <a onclick="changecity(this)" value="460000">  海南</a></span>
                    </div>
                </li>
                <li class="clearfix">
                    <div class="fl">西南<span></span></div>
                    <div class="fr clearfix"> <span> <a onclick="changecity(this)" value="500000">  重庆</a></span><span> <a onclick="changecity(this)" value="510000">  四川</a></span><span> <a onclick="changecity(this)" value="520000">  贵州</a></span><span> <a  onclick="changecity(this)" value="530000">  云南</a></span><span> <a  onclick="changecity(this)" value="630000">  青海</a></span>
                    </div>
                </li>
                <li class="clearfix" style="width:152px">
                    <div class="fl">西北<span></span></div>
                    <div class="fr clearfix four" style="width:100px"> <span> <a  onclick="changecity(this)" value="610000">  陕西</a></span><span> <a   onclick="changecity(this)" value="620000">  甘肃</a></span><span> <a  onclick="changecity(this)" value="640000">  宁夏</a></span><span> <a  onclick="changecity(this)" value="650000">  新疆</a></span>
                    </div>
                </li>
                <li class="clearfix" style="width:152px">
                    <div class="fl">东北<span></span></div>
                    <div class="fr clearfix four" style="width:100px"> <span> <a onclick="changecity(this)" value="210000">  辽宁</a></span><span> <a  onclick="changecity(this)" value="220000">  吉林</a></span><span> <a  onclick="changecity(this)" value="230000">  黑龙江</a></span>
                </li>
            </ul>
        </div>
        <div class="page-1 container clearfix">
            <div class="fl">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        @if(!empty($loading_ad))
                            @foreach($loading_ad as $ad)
                        <div class="swiper-slide"><img width="100%" height="440" src="{{URL::asset('img/'.$ad['pictures'])}}" alt=""/></div>
                            @endforeach
                        @endif
                    </div>
                    <div class="swiper-pagination"></div>
                    <div class="swiper-button-next"></div>
                    <div class="swiper-button-prev"></div>
                </div>
            </div>
            <div class="fr">
                <ul>
                    @if(!empty($hotnews))
                        <li><span>焦点</span>
                        @foreach($hotnews as $key=>$hot)
                            @if($key <1)
                            <a href="/news/{{$hot->id}}.html">
                                    <p>{{ subtext($hot->titles,30) }}</p></a>
                            @endif
                        @endforeach
                    @endif
                </ul>
                <dl class="clearfix">
                    @if(!empty($hotnews))
                        @foreach($hotnews as $key=>$randnews)
                            @if($key >1 && $key <=3)
                            <dd class="fl"><a href="/news/{{$randnews->id}}.html"><i><img src="{{URL::asset('img/'.$randnews->pictures)}}" width="100%" alt=""/></i>
                                    <h1>{{subtext($randnews->titles,30)}}</h1></a></dd>
                            @endif
                        @endforeach
                    @endif
                </dl>
                </li><div class="search-new clearfix">
                    <form class="clearfix" action="#">
                        <input class="text" type="text" id="search_name" value="" placeholder="请输入被寻人姓名"/>
                        <input class="submit" type="button" value="搜索" id="find_data"/>
                    </form>
                </div>
            </div>
        </div>
        <div class="page-2 clearfix container">
            <div class="title"><span> </span><span style="background:#f6a43b;top:auto;bottom:14px"></span><b>紧急寻人</b></div>
            <div class="clearfix">
                <ul class="list-1 fl">
                    @if(!empty($getrecommend))
                        @foreach($getrecommend as $p)
                            <li class="clearfix"><a href="/xrdt/{{$p->id}}.html"><i class="fl"><img width="115px" height="150px" src="{{URL::asset('img/'.$p->miss_pic)}}" alt=""/></i>
                                    <div class="fr">
                                        <h1>{{subtext($p->miss_desc, 15)}}</h1>
                                        <p>被寻人姓名：{{$p->miss_name}}</p>
                                        <p>出生日期：{{$p->miss_barth}}</p>
                                        <p>失散日期：{{$p->miss_date}}</p>
                                        <p>失散地点：{{$p->miss_access}}</p>
                                    </div></a></li>
                        @endforeach
                    @endif
                </ul>
                <ul class="list-2 fl">
                    @if(!empty($randdatas))
                        @foreach($randdatas as $r)
                            <li><a class="clearfix" href="/xrdt/{{$r->id}}.html"> <span class="fl">· @if($r ->find_type== 1) 寻找老友 @elseif($r ->find_type== 2) 寻找战友 @elseif($r ->find_type= 3)家寻亲人 @elseif($r ->find_type ==4) 亲人寻家 @elseif($r ->find_type ==5) 港澳台寻人 @elseif($r ->find_type==6) 海外寻人 @endif</span>
                                    <div class="fr">{{subtext($r->miss_desc,15)}}</div></a></li>
                        @endforeach
                    @endif
                    <li class="btn-group clearfix"><a class="fl" href="javascript:;" onclick="service_msg()">提供线索</a><a class="fr" href="/news/n2">寻人指南</a></li>
                </ul>
                <div class="fr list-3">
                    <h1>寻人报名</h1>
                    <ul class="clearfxi">
                        <li class="b1"> <a href="/fbxr.html">寻找老友</a></li>
                        <li class="b2"> <a href="/fbxr.html">寻找战友</a></li>
                        <li class="b3"> <a href="/fbxr.html">家寻亲人</a></li>
                        <li class="b3"> <a href="/fbxr.html">亲人寻家</a></li>
                        <li class="b2"> <a href="/fbxr.html">港澳台寻人</a></li>
                        <li class="b1"> <a href="/fbxr.html">海外寻人</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="page-3">
            <div class="title-2 container clearfix"><span class="fl"></span><b class="fl">终于等到你</b><span class="fr" style="background:#f6a43b"> </span></div>
            <div class="clearfix container">
                @if(!empty($isyou))
                    <div class="fl clearfix f1"><a href="/news/{{$isyou[0]->id}}.html"><img width="218px" height="138px" src="{{URL::asset('img/'.$isyou[0]->pictures)}}" alt=""/>
                            <div class="fr">
                                <h1>{{$isyou[0]->titles}}</h1>
                                <p>{!! subtext($isyou[0]->contents,60 )!!}</p>
                            </div></a></div>
                @endif
                <div class="fl f2">
                    <dl class="clearfix">
                        @if(!empty($isyou))
                            @foreach($isyou as $key=>$g)
                                @if(1<= $key && $key<=4)
                                <dd><a href="/news/{{$g->id}}.html" target="_blank"><img :width="133px" height="85px" src="{{URL::asset('img/'.$g->pictures)}}" alt="" width="100%"/>
                                        <h1>{{subtext($g->titles,12)}}</h1></a></dd>
                                @endif
                            @endforeach
                        @endif
                    </dl>
                </div>
                <div class="fr f3"><span class="top">成功案例</span>
                    <ul>
                        @if(!empty($recommend_news_four))
                            @foreach($recommend_news_four as $rand)
                                <a href="/news/{{$rand->id}}.html" target="_blank"><li><span>{{subtext($rand->titles,12)}}</span><span class="grey fr">[{{date('Y.m.d',$rand->publish_time)}}]</span></li></a>
                            @endforeach
                        @endif

                    </ul>
                </div>
            </div>
        </div>
        <div class="page-4 container">
            <div class="title"><span> </span><span style="background:#f6a43b;top:auto;bottom:14px"></span><b>最新寻人 </b></div>
            <ul class="clearfix">
                @if(!empty($new_msg))
                    @foreach($new_msg as $m)
                        <li>
                            <a href="/xrdt/{{$m->id}}.html">
                                <img  style="width:114px;height: 150px" class="specical_img" src="{{URL::asset('img/'.$m->miss_pic)}}" alt="" />
                                <h1>{{$m->miss_name}}  {{$m->Name}} </h1>
                            </a>
                        </li>
                    @endforeach
                @endif
            </ul>
        </div>
        <div class="page-5 container">
            <div class="title-2 container clearfix"><span class="fl"></span><b class="fl">寻人大厅</b><span class="fr" style="background:#f6a43b"> </span></div>
            <div class="clearfix">
                <div class="fl page-5-l">
                    <ul>
                        <li class="active" onclick="allfind(this)" > 全部<em></em></li>
                        <li onclick="changetab(this)" value="3"> 家寻亲人<em></em></li>
                        <li onclick="changetab(this)" value="4">亲人寻家<em></em></li>
                        <li onclick="changetab(this)" value="2">寻找战友<em></em></li>
                        <li onclick="changetab(this)" value="1">寻找老友<em></em></li>
                        <li onclick="changetab(this)" value="5">港澳台寻人<em></em></li>
                        <li onclick="changetab(this)" value="6">海外寻人</li>
                    </ul>
                </div>
                <div class="fr page-5-r">
                    <ul class="clearfix change_tab">
                        @if(!empty($default))
                            @foreach($default as $d)
                                <li class="fl">
                                    <a href="/xrdt/{{$d->id}}.html"><img style="width:114px;height: 150px" class="specical_img" src="{{URL::asset('img/'.$d->miss_pic)}}" alt=""/>
                                        <h1>{{$d->miss_name}}   {{$d->Name}} </h1>
                                    </a>
                                </li>
                            @endforeach
                        @endif
                    </ul>
                </div>
            </div>
        </div>
        <div class="page-6 container">
            <div class="title"><span> </span><span style="background:#f6a43b;top:auto;bottom:14px"></span><b>综合资讯</b></div>
            <ul class="clearfix">
                <li>
                    <h1>防拐防骗</h1>
                    <div class="content">
                        @if(!empty($recommend_news))
                            @foreach($recommend_news as $one)
                                <a href="/news/{{$one->id}}.html"><p>·{{subtext($one->titles,17)}}</p></a>
                            @endforeach
                        @endif
                    </div></li>
                <li>
                    <h1>寻人方法</h1>

                    <div class="content">
                        @if(!empty($recommend_news_two))
                            @foreach($recommend_news_two as $two)
                                <a href="/news/{{$two->id}}.html"><p>·{{subtext($two->titles,17)}}</p></a>
                            @endforeach
                        @endif
                    </div></li>
                <li style="margin:0">
                    <h1>政策法规</h1>
                    <div class="content">
                        @if(!empty($recommend_news_three))
                            @foreach($recommend_news_three as $three)
                                <a href="/news/{{$three->id}}.html"><p>·{{subtext($three->titles,17)}}</p></a>
                            @endforeach
                        @endif
                    </div></li>
            </ul>
        </div>
        @stop
        @section('js')
            <script>
                function service_msg(){
                    alert("请您拨打我们客服联系电话: 400-991-6578 或者微信资讯")
                }
            </script>
            <script src="{{URL::asset('js/webindex.js')}}"></script>
@stop